<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:99:"D:\development\2C8BF558-3886-40A2-B2B6-E724420FD872\public/../application/index\view\form\form.html";i:1502258164;}*/ ?>

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>通用表单</title>
<link rel="stylesheet" type="text/css" href="<?php echo STATIC_PATH; ?>/css/form.css">
<script type="text/javascript" src="<?php echo STATIC_PATH; ?>/js/form.js"></script>
</head>
<body>
    <h3 align="center">创建表单</h3>


<form  action="<?php echo url('Form/insert'); ?>" method="post" name="form" id="form" onsubmit="return checkForm()" >


      <p>关键词</p>
      <input type="text" name="keyword" id="keyword">

      <p><span style="color:red">*</span>标题</p>
      <input type="text" name="title" id="title">

      <p>封面图片&nbsp;<span style="color:#aaa">图片高度控制在200px-400px之间</span></p>
       <input type="file" accept="image/*" name="coverimg_url" id="coverimg_url">

      <p>描述</p>
      <textarea name="content" id="content"></textarea>

      <p>用户提交后提示内容&nbsp;<span style="color:#aaa">为空默认为：提交成功，谢谢参与</span></p>
      <textarea name="finish_tip" id="finish_tip">提交成功，谢谢参与</textarea>



      <p><span style="color:red">*</span>字段管理</p>
      

<!-- <form action="" method="post" name="form"> -->
<!-- <input type="hidden" name="fid" value=""> -->
     <table id="myTable">
     <tr>
        <td>选项名称</td>
        <td>选项类型</td>
        <td>选项数据</td>
        <td>是否必填</td>
        <td>操作</td>
    </tr>
    <tr>

        <td><input class='one' type='text' name='choice_name' id='choice_name' value='' ></td>
        
        <td><select class='two' name='choice_type'>
           <option value='text' selected>单行文本(text)</option><!-- 默认选择单行文本 -->
           <option value='textarea'>多行文本(textarea)</option>
           <option value='select'>下拉框(select)</option>
           <option value='radio'>单选框(radio)</option>
           <option value='checkbox'>多选框(checkbox)</option>
         </select>
       </td> 
       
       <td><input class='three' type='text' name='choice_data' id='choice_data' size='50' value='' placeholder='各选项用逗号隔开'></td>
       
       <td>是<input  type='radio' name='is_must' value='1'>
          否<input  type='radio' name='is_must' value='0' checked><!-- 默认选择否 -->
        </td>
       
       <td><a onClick='del(this)' href='javascript:;'>删除</a></td>
     </tr>

 </table>   
 <p><a href="#" name="addRow">增加新字段</a></p>
 <button type="submit" id="<?php echo $id; ?>" class="submit">完成</button>
 <p><a href="<?php echo url('Index/text'); ?>">返回管理页面</a></p>

 
 </form>
 <!-- <a href="<?php echo url("Form/preview"); ?>" target="_blank">预览</a> -->
</body>
</html>